package com.sky.controller.user;

import com.sky.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;

/**
 * @version 1.0
 * @Author 郭腾高
 * @Date 2024/9/21 21:10
 */
@RestController("userShopController")
@Slf4j
@RequestMapping("/user/shop")
public class ShopController {

    @Autowired
    private RedisTemplate redisTemplate;

    public static final String key = "SHOP_STATUS";

    //查询营业状态
    @GetMapping("/status")
    public Result<Integer> getStatus(){
        Integer integer = (Integer) redisTemplate.opsForValue().get(key);
        return Result.success(integer);
    }


}
